<include file="public/header"/>

<body>

<form id="edit_info">
<!--main-->
<div class="pPersonal-warp">
  <div class="pdata-column-editor">

    <if condition="$type eq 1">
      <input type="text" class="nick-inpt" placeholder="请输入您的昵称" name="username" value="{$user.username}">
    </if>

    <if condition="$type eq 2">
      <select name="sex" class="nick-inpt">
        <option value="未知" <if condition="$user.sex eq '未知'">selected</if> >未知</option>
        <option value="男" <if condition="$user.sex eq '男'">selected</if> >男</option>
        <option value="女" <if condition="$user.sex eq '女'">selected</if> >女</option>
        <option value="保密" <if condition="$user.sex eq '保密'">selected</if> >保密</option>
      </select>
    </if>

    <if condition="$type eq 3">
      <input type="number" class="nick-inpt" placeholder="请输入您的年龄" name="year" value="{$user.year}" >
    </if>

    <if condition="$type eq 4">
      <input type="email" class="nick-inpt" placeholder="请输入您的邮箱" name="email" value="{$user.email}" >
    </if>

    <if condition="$type eq 5">
      <input type="number" class="nick-inpt" placeholder="请输入您的球龄年份" name="ball_year" value="{$user.ball_year}" >
    </if>

    <if condition="$type eq 6">
      <select name="region" class="nick-inpt">
        <option value="">请选择</option>
        <volist name="regions" id="list">
          <option value="{$list.name}" <if condition="$user.region eq $list.name">selected</if> >{$list.name}</option>
        </volist>
      </select>
    </if>

    <input type="hidden" name="type" value="{$type}"/>
  </div>
  <div class="pdata-column-save">
    <a href="javascript:;" class="s-btn" onclick="edit_info()">保存</a>
  </div>
</div>
<!--main End-->
</form>

<script>
    function edit_info() {
        ajax_submit('edit_info', "{:U('Home/User/edit_info_do')}");
    }
</script>

</body>
</html>
